﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.Security"
				        namespace="Inovout.Security">

  <joined-subclass  name="SystemUser" extends="User" table="Security_SystemUser">
    <key column="SystemUserId" />

    <!--<set name="UserCredentials" table="Security_SystemUser_Credential">
      <key column="SystemUserId"/>
      <many-to-one id-type="System.Int32"
    			meta-type="System.String">
        <meta-value value="FormsUserCredential" class="Inovout.Security.FormsUserCredential,Inovout.Security"/>
        <meta-value value="OpenIdUserCredential" class="Inovout.Security.OpenIdUserCredential,Inovout.Security"/>
        <meta-value value="OAuthUserCredential" class="Inovout.Security.OAuthUserCredential,Inovout.Security"/>
        <column name="CredentialType" not-null="true"/>
        <column name="CredentialId" not-null="true"/>
      </many-to-one>
    </set>-->

    <set name="UserCredentials" inverse="true">
      <key column="SystemUserId"></key>
      <one-to-many class="Inovout.Security.UserCredential,Inovout.Security"/>
    </set>

    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </joined-subclass>
</hibernate-mapping>


